package com.jilefojing.beans.pojos.enhanced;

import java.util.Date;
import java.util.List;

import com.jilefojing.beans.enums.ProgressStatusForSource;
import com.jilefojing.beans.enums.StatusEnumForPublish;
import com.jilefojing.beans.pojos.EAudio;
import com.jilefojing.beans.pojos.enhanced.base.BaseEnhanced;
import com.jilefojing.beans.vo.PlayTypeForEAudio;

public class EnhancedEAudio extends BaseEnhanced {
	public EnhancedEAudio(EAudio eAudio) {
		if (eAudio.getId() != null) {
			this.id = eAudio.getId();
		}
		this.title = eAudio.getTitle();
		this.skey = eAudio.getSkey();
		this.sources = eAudio.getSources();

		this.createTime = eAudio.getCreateTime();
		this.updateTime = eAudio.getUpdateTime();
		this.coverUrl = eAudio.getCoverUrl();
		if (eAudio.getCreateUser() != null) {
			EnhancedUser _EnhancedCreateUser = new EnhancedUser();
			_EnhancedCreateUser.setId(eAudio.getCreateUser());
			this.enhancedCreateUser = _EnhancedCreateUser;
		}
		if (eAudio.getEntity() != null) {
			if (eAudio.getEntity() == 1) {
				this.setEntity(true);
			}
		}

		if (eAudio.getParentId() != null && eAudio.getParentId() > 0) {
			EnhancedEAudio _enhancedParentEAudio = new EnhancedEAudio();
			_enhancedParentEAudio.setId(eAudio.getParentId());
			this.enhancedParent = _enhancedParentEAudio;
		}
		if (eAudio.getSort() != null) {
			this.sort = eAudio.getSort();
		}
		this.summary = eAudio.getSummary();
		this.info = eAudio.getInfo();
		if (eAudio.getPlaytime() != null) {
			this.playtime = eAudio.getPlaytime();
		}
		if (eAudio.getStatus() != null) {
			this.status = StatusEnumForPublish.getStatusEnumByCode(eAudio
					.getStatus());
		}
		if (eAudio.getEntity() != null && eAudio.getEntity() == 1) {
			this.entity = true;
		}
		if (eAudio.getProgressStatus() != null) {
			this.progressStatus = ProgressStatusForSource
					.getProgressStatusEnumByCode(eAudio.getProgressStatus());
		}
		this.tudouCode = eAudio.getTudouCode();
		this.copyPublishTime = eAudio.getCopyPublishTime();
		this.copyWebsiteName = eAudio.getCopyWebsiteName();
		this.copyWebsiteUrl = eAudio.getCopyWebsiteUrl();
	}

	public EnhancedEAudio() {

	}

	private long id;
	private String title;
	private String skey;
	private String sources;
	private List<PlayTypeForEAudio> playTypes;
	private Date createTime;
	private Date updateTime;
	private String coverUrl;
	private EnhancedUser enhancedCreateUser;
	private EnhancedStatistics enhancedStatistics;// 统计数据
	private boolean entity;
	private EnhancedEAudio enhancedParent;
	private List<EnhancedEAudio> enhancedChildren;
	private EnhancedAttitude enhancedAttitude;// 用户态度
	private EnhancedRFavoriteSource enhancedRFavoriteSource;// 用户收藏对象
	private double sort;
	private String summary;
	private String info;
	private long playtime;
	private StatusEnumForPublish status;
	private ProgressStatusForSource progressStatus;
	private String tudouCode;
	private Date copyPublishTime;
	private String copyWebsiteName;
	private String copyWebsiteUrl;

	/**
	 * 统计同来源相关资源
	 */
	private int countCognate;
	/**
	 * 统计同来源相关资源 播放总时间
	 */
	private long countCognatePlaytime;

	/**
	 * 拥有者
	 */
	private EnhancedUser enhancedOwner;
	/**
	 * 标签列表
	 */
	private List<EnhancedTag> enhancedTags;

	/**
	 * 所属有声书分类
	 */
	private List<EnhancedDCategory> enhancedYoushengshuDCategories;
	/**
	 * 所属音乐分类
	 */
	private List<EnhancedDCategory> enhancedYinyueDCategories;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getCoverUrl() {
		return coverUrl;
	}

	public void setCoverUrl(String coverUrl) {
		this.coverUrl = coverUrl;
	}

	public EnhancedUser getEnhancedCreateUser() {
		return enhancedCreateUser;
	}

	public void setEnhancedCreateUser(EnhancedUser enhancedCreateUser) {
		this.enhancedCreateUser = enhancedCreateUser;
	}

	public List<PlayTypeForEAudio> getPlayTypes() {
		return playTypes;
	}

	public void setPlayTypes(List<PlayTypeForEAudio> playTypes) {
		this.playTypes = playTypes;
	}

	public Date getCopyPublishTime() {
		return copyPublishTime;
	}

	public void setCopyPublishTime(Date copyPublishTime) {
		this.copyPublishTime = copyPublishTime;
	}

	public String getCopyWebsiteName() {
		return copyWebsiteName;
	}

	public void setCopyWebsiteName(String copyWebsiteName) {
		this.copyWebsiteName = copyWebsiteName;
	}

	public String getCopyWebsiteUrl() {
		return copyWebsiteUrl;
	}

	public void setCopyWebsiteUrl(String copyWebsiteUrl) {
		this.copyWebsiteUrl = copyWebsiteUrl;
	}

	public String getSources() {
		return sources;
	}

	public void setSources(String sources) {
		this.sources = sources;
	}

	public String getSkey() {
		return skey;
	}

	public void setSkey(String skey) {
		this.skey = skey;
	}

	public EnhancedStatistics getEnhancedStatistics() {
		return enhancedStatistics;
	}

	public void setEnhancedStatistics(EnhancedStatistics enhancedStatistics) {
		this.enhancedStatistics = enhancedStatistics;
	}

	public boolean isEntity() {
		return entity;
	}

	public void setEntity(boolean entity) {
		this.entity = entity;
	}

	public EnhancedEAudio getEnhancedParent() {
		return enhancedParent;
	}

	public void setEnhancedParent(EnhancedEAudio enhancedParent) {
		this.enhancedParent = enhancedParent;
	}

	public List<EnhancedEAudio> getEnhancedChildren() {
		return enhancedChildren;
	}

	public void setEnhancedChildren(List<EnhancedEAudio> enhancedChildren) {
		this.enhancedChildren = enhancedChildren;
	}

	public double getSort() {
		return sort;
	}

	public void setSort(double sort) {
		this.sort = sort;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public int getCountCognate() {
		return countCognate;
	}

	public void setCountCognate(int countCognate) {
		this.countCognate = countCognate;
	}

	public long getCountCognatePlaytime() {
		return countCognatePlaytime;
	}

	public void setCountCognatePlaytime(long countCognatePlaytime) {
		this.countCognatePlaytime = countCognatePlaytime;
	}

	public long getPlaytime() {
		return playtime;
	}

	public void setPlaytime(long playtime) {
		this.playtime = playtime;
	}

	public EnhancedUser getEnhancedOwner() {
		return enhancedOwner;
	}

	public void setEnhancedOwner(EnhancedUser enhancedOwner) {
		this.enhancedOwner = enhancedOwner;
	}

	public EnhancedAttitude getEnhancedAttitude() {
		return enhancedAttitude;
	}

	public void setEnhancedAttitude(EnhancedAttitude enhancedAttitude) {
		this.enhancedAttitude = enhancedAttitude;
	}

	public StatusEnumForPublish getStatus() {
		return status;
	}

	public void setStatus(StatusEnumForPublish status) {
		this.status = status;
	}

	public EnhancedRFavoriteSource getEnhancedRFavoriteSource() {
		return enhancedRFavoriteSource;
	}

	public void setEnhancedRFavoriteSource(
			EnhancedRFavoriteSource enhancedRFavoriteSource) {
		this.enhancedRFavoriteSource = enhancedRFavoriteSource;
	}

	public List<EnhancedTag> getEnhancedTags() {
		return enhancedTags;
	}

	public void setEnhancedTags(List<EnhancedTag> enhancedTags) {
		this.enhancedTags = enhancedTags;
	}

	public ProgressStatusForSource getProgressStatus() {
		return progressStatus;
	}

	public void setProgressStatus(ProgressStatusForSource progressStatus) {
		this.progressStatus = progressStatus;
	}

	public List<EnhancedDCategory> getEnhancedYoushengshuDCategories() {
		return enhancedYoushengshuDCategories;
	}

	public void setEnhancedYoushengshuDCategories(
			List<EnhancedDCategory> enhancedYoushengshuDCategories) {
		this.enhancedYoushengshuDCategories = enhancedYoushengshuDCategories;
	}

	public List<EnhancedDCategory> getEnhancedYinyueDCategories() {
		return enhancedYinyueDCategories;
	}

	public void setEnhancedYinyueDCategories(
			List<EnhancedDCategory> enhancedYinyueDCategories) {
		this.enhancedYinyueDCategories = enhancedYinyueDCategories;
	}

	public String getTudouCode() {
		return tudouCode;
	}

	public void setTudouCode(String tudouCode) {
		this.tudouCode = tudouCode;
	}

}